<template>
<div class="cuanyueheader">

	<el-row>
	  <el-col :span="1">
	  &nbsp;
	  </el-col>
	  <el-col :span="7">
	  	<img src="https://img.hidlq.com/image/cuanyue/logo.png" width="200" height="60">
	  </el-col>
	  <el-col :span="16">
		<el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
		  <el-menu-item index="1" >首页</el-menu-item>
		  <el-menu-item index="2">品牌优势</el-menu-item>
		  <el-menu-item index="3">了解汆悦</el-menu-item>
		  <el-menu-item index="4">招商加盟</el-menu-item>
		  <el-menu-item index="5">新闻资讯</el-menu-item>
		  <el-menu-item index="6">汆悦伙伴</el-menu-item>
		  <el-menu-item index="7">联系我们</el-menu-item>
		  <!-- <el-submenu index="2">
		    <template slot="title">我的工作台</template>
		    <el-menu-item index="2-1">选项1</el-menu-item>
		    <el-menu-item index="2-2">选项2</el-menu-item>
		    <el-menu-item index="2-3">选项3</el-menu-item>
		    <el-submenu index="2-4">
		      <template slot="title">选项4</template>
		      <el-menu-item index="2-4-1">选项1</el-menu-item>
		      <el-menu-item index="2-4-2">选项2</el-menu-item>
		      <el-menu-item index="2-4-3">选项3</el-menu-item>
		    </el-submenu>
		  </el-submenu>
		  <el-menu-item index="3" disabled>消息中心</el-menu-item>
		  <el-menu-item index="4"><a href="https://www.ele.me" target="_blank">订单管理</a></el-menu-item> -->
		</el-menu>
	  </el-col>
	</el-row>

	

	

</div>
</template>

<script>

import { mapGetters } from 'vuex'

export default {
	
	name : 'cuanyueheader',
	
	data () {
		return {
		  	activeIndex: this.$route.query.what == undefined ? '1' : this.$route.query.what,
        	activeIndex2: '1'
		}
	},

	props : {

	},

	components : {
		
	},

	computed : {
		...mapGetters([
			
		]),
	},

	methods : {
		handleSelect (index) {

			this.$router.push({
	    		'name' : 'cuanyueindex',
	    		'query' : { 'what' : index},
	    	});

			// if(index == '1'){
			// 	this.$router.push({
		 //    		'name' : 'cuanyueindex',
		 //    		'query' : { 'what' : 1},
		 //    	});
			// }else if(index == '2'){
			// 	this.$router.push({
		 //    		'name' : 'cuanyueindex',
		 //    		'query' : { 'what' : 2},
		 //    	});
			// }else if(index == '3'){
			// 	this.$router.push({
		 //    		'name' : 'cuanyueindex',
		 //    		'query' : { 'what' : 3},
		 //    	});
			// }else if(index == '4'){
			// 	this.$router.push({
		 //    		'name' : 'cuanyuezhaoshangjiameng',
		 //    	});
			// }else if(index == '5'){
			// 	this.$router.push({
		 //    		'name' : 'cuanyuexinwenzixun',
		 //    	});
			// }else if(index == '6'){
			// 	this.$router.push({
		 //    		'name' : 'cuanyuecuanyuehuoban',
		 //    	});
			// }else if(index == '7'){
			// 	this.$router.push({
		 //    		'name' : 'cuanyuelianxiwomen',
		 //    	});
			// }



		},
	},

	watch : {
	    
	},

	mounted () {
		console.log(this.$route.query.what);
	},

}
</script>

<style scoped>
.cuanyueheader {
	width: 1280px;
	height: 60px;
	background-color: #fff;
	margin : 0 auto;
}
</style>
